package dao;

import util.DBHelper;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class TPIDMemoryDAO {
	
	
	public int increaseTPID(Statement statement) throws SQLException {
		
		ResultSet rs;
		
		int nTpid = 0;
		rs = statement.executeQuery("select * from teachingplanidmemory");
		rs.next();
		nTpid = rs.getInt(1);
	
		statement.execute("update teachingplanidmemory set TPID=TPID+1");
		rs.close();
		return nTpid;
	}
}
